public class Test05{
    public static void main(String[] args) {
            int[] array = new int[] {12,3,5,7,6};
            double avg = getAvg(array);
            System.out.println("average:" + avg);
    }
        public static double getAvg(int[] arr){
            int length = arr.length;
             double sum = 0;
            for(int i=0; i < length; i++){
                sum = sum + arr[i];
            }
            return sum/length;
        }
        
}